﻿using AppSocketModel;
using System.Collections.Generic;

namespace AppSocketService.Location
{
    /// <summary>
    /// 一个账户车辆位置
    /// </summary>
    public interface ILocationService
    {
        /// <summary>
        /// 初始化REDIS用 获取全部位置列表
        /// </summary>
        /// <returns></returns>
        List<LocationDto> InitRedisGetListAll();
        /// <summary>
        /// 添加的车辆的位置信息
        /// </summary>
        /// <param name="locationDto"></param>
        /// <returns></returns>
        LocationDto AddNew(LocationDto locationDto);

        /// <summary>
        /// 删除一个车辆位置信息
        /// </summary>
        /// <param name="vehicleDto"></param>
        /// <returns></returns>
        int Delete(VehicleDto vehicleDto);

        /// <summary>
        /// 更新车辆位置
        /// </summary>
        /// <param name="gpsInfoDto"></param>
        void UpdateGpsInfo(GpsInfoDto gpsInfoDto);

        /// <summary>
        /// 修改车辆IMEI
        /// </summary>
        /// <param name="vehicleNo"></param>
        /// <param name="Imei"></param>
        LocationDto UpdateImei(string vehicleNo, string Imei);

        /// <summary>
        /// 获取IMEI定位信息
        /// </summary>
        /// <param name="imei"></param>
        /// <param name="gpsMapType"></param>
        /// <returns></returns>
        LocationDto GetLocation(string imei,GpsMapType gpsMapType );

        /// <summary>
        /// 获取 MongoDB 指定账户定位信息 不包括子账户
        /// </summary>
        /// <param name="accountId"></param>
        /// <param name="gpsMapType"></param>
        /// <returns></returns>
        List<LocationDto> GetList(string accountId, GpsMapType gpsMapType);

        /// <summary>
        /// 获取 MongoDB 指定账户定位信息 包括子账户
        /// </summary>
        /// <param name="accountId"></param>
        /// <param name="gpsMapType"></param>
        /// <returns></returns>
        List<LocationDto> GetListAll(string accountId, GpsMapType gpsMapType);

        /// <summary>
        /// 设置车辆归属账户
        /// </summary>
        /// <param name="imei"></param>
        /// <param name="accountId"></param>
        LocationDto SetVehicleAccount(string imei, string accountId);
    }
}